<?php
require __DIR__ . '/moovpay.php';

$txnAmt = (int)$_POST['txnAmt'];
// echo $txnAmt;
$time = date('YmdHis');
// set up rest as your spaces
$securityCode = '600f7de7c2ea6e98fb3cefef';
$merchantCode = '99987020033';
$mid = '555070282990011';
// use your own way to generate order ID.
$orderID = uniqid();
// set as your front end call back url
$frontendURL = "https://xxx.com/frontend";
// set as your back end call back url 
$backendURL = "https://xxx.com/backend";
$moovpay = new MoovPaySDK;
$response = $moovpay->in_app_purchase($securityCode, $frontendURL, $backendURL, $merchantCode, $mid, $orderID, $time, '', $txnAmt, '');
$responseData = $moovpay->buildJSONFromString($response, "&", "=");
echo $responseData;
?>